<!--<?php
print <<<EOT
-->
<link href="css/cssTitle.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="css/jsTitle.js" ></script>
<script src="css/edit.js"></script> 
<script type="text/javascript">

<!--
var FinishImagePath = null;
var jsonSettingImage = null;
 $jsonFinishImagePath
 $jsonSettingImage
function addCart(id) {
    if(validateForm()){
	 var fitemid = $("#selFinish"+id).val()==null?0:$("#selFinish"+id).val();
       // url = "cart_view.php?act=add&inventorytype=0&inventoryid=0&pid="+id+"&js=1&addnum="+ $("#buy_num_form").val()+"&fitemid="+$("#selFinishes").val();
	   url = "cart_view.php?act=add&inventorytype=0&inventoryid=0&pid="+id+"&js=1&addnum="+ $("#buy_num_form").val()+"&fitemid="+fitemid;
        document.getElementById('addtocontentiframe').src=url;
    }
}
var curpid = "{$product_info_ary['id']}";
var curcode = "{$product_info_ary['code']}";
function addWishlist(n) {
    var fitemid = $("#selFinishes").val();
    if(fitemid == 0 && $("#selFinishes").children().size() > 1)
    {
        alert('Please select a finish!');
        $("#selFinishes").focus();
        return;
    }
    else if($("#selWishlist").val()==0 && !n)
    {
        alert('Please select a wishlist!');
        $("#selWishlist").focus();
        return;
    }
    else{
        url = "wishlist_view.php?act=add&pid="+curpid+"&code="+curcode+"&wid="+$("#selWishlist").val();
        if(n)
        {
            if($("#txtWishName").val() == "")
            {
                alert('Please input the wishlist name!');
                $("#txtWishName").focus();
                return;
            }
            else
            {
                url = url +"&new=1"+"&wname="+$("#txtWishName").val();    
            }
        }
        //alert(url);
        document.getElementById('addwishlistiframe').src=url;
    }
}

var pid = {$pid};
var paramStr = '{$urlParam}';

var go_url2 = 'product_details.php?'+paramStr+'&pid=' + pid;
function goPreviewPage() {
    url = go_url2 +'&gotype=preview#atpic';
    location.href=url;
}

function goNextPage() {
    url = go_url2 +'&gotype=next#atpic';
    location.href=url;
}

function goPrint() {
	url = "printer.php?page=product_details&pid=" + pid;
	location.href=url;
}

function FinishItemChange(id)
{
    var str = '';
    eval("str = FinishImagePath.Finish_"+id);
    if(str!='')
        $("#imgFinishItem").attr("src",str).show();
    else 
        $("#imgFinishItem").hide();
}

function validateForm()
{
    var buy_num = $("#buy_num_form").val();
    var fitemid = $("#selFinishes").val();
    if(fitemid == 0 && $("#selFinishes").children().size() > 1)
    {
        alert('Please select a finish!');
        $("#selFinishes").focus();
        return false;
    }
    else if (!IsNumber(buy_num)||buy_num==0) {
        alert('Please enter the order qty !');
        $("#buy_num_form").focus();
        return false;
    } 
    return true;
}

//add new wish list 

function showTaggle(id)
{
  $("#"+id).toggle()
}

function hiddeDIV(id)
{
  $("#"+id).fadeOut()
}
function CancelClick()
{
    showTaggle("addnew-wishlist");
    $("#txtWishName").val("");
}


$(window).load(function(){

 

    $("#imageLink").html('<img src="'+$("#hfImagePath").val()+'"  name="jf_product_images_lg_image"  class="picture" id="jf_product_images_lg_image" width="384" height="384" border="0"/>');

    if(jsonSettingImage == null) return ;
    for(i=0;i<jsonSettingImage.length;i++)
    {
        $("#divSettingProduct").append('<a href="product_details.php?{$detailUrlParam}pid='+jsonSettingImage[i].id+'#atpic" title="'+jsonSettingImage[i].name+'"><img alt="'+jsonSettingImage[i].name+'" src="'+jsonSettingImage[i].small_pic+'"/></a>');
    }
	
	   if(FinishImagePath == null) return ;
    for(i=0;i<FinishImagePath.length;i++)
    {
        var img = new Image();
        img.src = FinishImagePath[i];
    }
	
});
//-->
</script>

           
     
            
                
             $postiondiv
	            <div class="main_search">					 
                 $page_search
                <div align="center" class="paging_bar"></div>
	            </div>
                 <div class="main" style="height:auto; overflow:hidden;">	 
                 <div class="lst_nav">	 $category_list    
				 {$chineseLink}             
                 	<br/>
                  <br/>   
                 </div>
                <div class="lst_listing" style="padding-right:0px;">  
                
                
                
                
                  
<!--
EOT;
  {
print <<<EOT
-->                
                   
                  
                  <table width="784" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                    <td class="show_title" width="390">
                    <div style="font-size: 18px; font-family: Helvetica,Verdana,Arial,sans-serif; color: rgb(118, 118, 118);">
	                <p style="font-size: 18px; font-family: Helvetica,Verdana,Arial,sans-serif; color: rgb(118, 118, 118); line-height:110%; padding-bottom:0;" class="prod_title">{$product_info_ary['code']}<!-- $category_name --> </p>
	                <span  class="productDetailsTitles">{$product_info_ary['name']}</span>	                
	                {$item_flag} <span style="font-size:12px;">{$remarks}</span>
	               </div>                            
                  </td>
                  <td width="4" ></td>
                  <td width="390" valign="bottom" align="right" >
                  <table width="390" border="0" cellspacing="0" cellpadding="0">
                  	<tr>
                  		<td class="show_title"></td>
                  		<td style="text-align:right">
                  			<a href="javascript:;" onClick="MM_openBrWindow('printer.php?page=product_details&pid={$product_info_ary['id']}','printerfriendly','scrollbars=yes,width=600,height=500')" onMouseOver="MM_swapImage('jf_button_print','','./images/button/jf_button_print-e-Catalogue-over.gif',1)" onMouseOut="MM_swapImgRestore()">
                        	<img src="./images/button/jf_button_print-e-Catalogue.gif" alt="Printer Friendly" name="jf_button_print" width="85" height="13" border="0"  align="absmiddle" id="jf_button_print">
                        	</a>
                  		</td>
                  	</tr>
                          <tr>
                            <td class="show_title"></td>
                            <td style="text-align:right" >
							<a style="cursor:pointer" onclick="goPreviewPage()" onmouseover="document.getElementById('jf_button_back1').src='./images/button/1jf_button_back-over.gif'" onmouseout="document.getElementById('jf_button_back1').src='./images/button/1jf_button_back.gif'"><img src="images/button/1jf_button_back.gif" id="jf_button_back1" width="96" height="20" border="0"></a>
							<a style="cursor:pointer" onclick="goNextPage()" onmouseover="document.getElementById('jf_button_next2').src='./images/button/1jf_button_next-over.gif'" onmouseout="document.getElementById('jf_button_next2').src='./images/button/1jf_button_next.gif'"><img src="images/button/1jf_button_next.gif" id="jf_button_next2" width="96" height="20" border="0"></a>
							</td>
                          </tr> 
                        </table>                   
                  </td>
                      
                    </tr>
                   
                 
                  
<!--
EOT;
}
print <<<EOT
-->                    
                  

                   
                    <tr>
                      
                      <td  valign="top" >
<!---image start--->
<!--
EOT;
if($showProductCategory)
{
print <<<EOT
--> 				
                   
					 <a href="product_details_pic.php?pid={$product_info_ary['id']}" target="_blank" title="{$product_info_ary['info']}" id="imageLink"></a><input type="hidden" id="hfImagePath" value="zh/attachments/{$product_info_ary['pic']}" />
<!--
EOT;
}
else
{
print <<<EOT
--> 
		The products you request is not published!
<!--
EOT;
}
print <<<EOT
--> 
<!---image end----->					  
					  </td>
					   <td></td>
                       <td valign="top" align="right">
                     
                       
                       
<!--
EOT;
if($showProductCategory)
{
print <<<EOT
--> 					  

<!--info table start -->	
 <table  border="0" cellspacing="2" cellpadding="0" width="390"  bgcolor="#D3B257"  class="details-right-box" > 
 <tr>
    
  <td width="50%" valign="top" height="190" style="padding:5px;">  
    <table  border="0" cellspacing="0" cellpadding="0" width="175" > 
	 <tr>
         <td style="width:45px; text-align:right;" height="20"><strong style="color:#333;">W</strong></td>
         <td  style="width:45px;text-align:right;" ><strong style="color:#333;">D</strong></td>
         <td  style="width:45px;text-align:right;"><strong style="color:#333;">H</strong></td>
         <td  style="width:45px;text-align:right;">&nbsp;</td>
       </tr>
     
        <tr>
          <td height="18" align="right">{$product_info_ary['width']}</td>
          <td  align="right">{$product_info_ary['length']}</td>
          <td  align="right">{$product_info_ary['height']} </td>
          <td   ><strong style="color:#333; padding-left:15px;">cm</strong></td>
       </tr>
<!--	   
        <tr>
            <td height="18"  align="right">{$width_inch}</td>
            <td  align="right">{$length_inch} </td>
            <td  align="right">{$height_inch}</td>
            <td  ><strong style="color:#333;padding-left:15px;">inch</strong> </td>
       </tr>  
       
        <tr>
           <td height="18"  align="right"><strong style="color:#333;">Volume</strong></td>
           <td>&nbsp;</td>
           <td  align="right">{$product_info_ary['cbm']}</td>
           <td ><strong style="color:#333;padding-left:15px;">cbm</strong></td>
       </tr>
          <tr>
           <td height="18"></td>
           <td>&nbsp;</td>
           <td  align="right">{$product_info_ary['cuft']} </td>
           <td  ><strong style="color:#333;padding-left:15px;">cuft</strong></td>
       </tr>
      <tr>
	     <td height="10" ></td>
		  <td ></td> 
		  <td ></td>
	   </tr>-->
       </table>
    <table  border="0" cellspacing="0" cellpadding="0" width="175" >     
      <!--
EOT;
if ($product_info_ary['finishshown'] != ''|| $product_info_ary['fabricshown'] != '' || $product_info_ary['leathershown'] != '' || $product_info_ary['marbleshown'] != '' ) {
print <<<EOT
-->
    <tr>
           <td height="20" width="55"><strong style="color:#333;">Shown In</strong></td> 
           <td width="20" align="center"></td>
           <td width="100" align="center"></td>
       </tr>
<!--
EOT;
}
print <<<EOT
-->     
  <!--
EOT;
if ($product_info_ary['finishshown'] != '') {
print <<<EOT
-->
    
						<tr>
							<td height="15" valign="top" ><strong style="color:#333;">Finish</strong></td>
							<td valign="top" align="center">:</td>
							<td >{$product_info_ary['finishshown']}</td>							
						</tr>
<!--
EOT;
}

if ($product_info_ary['fabric_id'] != ''&&$product_info_ary['fabric_id'] !=0) {
print <<<EOT
-->	
						<tr>
							<td height="15" valign="top"><strong style="color:#333;">Fabric</strong></td>
							<td  valign="top" align="center">:</td>
								<td >{$fabric_arr[$product_info_ary['fabric_id']]['name']}</td>																		
						</tr>
<!--
EOT;
$showimg=$fabric_arr[$product_info_ary['fabric_id']]['photo'];
}else if ($product_info_ary['leather_id'] != ''&&$product_info_ary['leather_id'] != 0) {
print <<<EOT
-->																	
						<tr>
							<td height="15" valign="top"><strong style="color:#333;">Leather</strong></td>
							<td valign="top" align="center">:</td>
							<td >{$leather_arr[$product_info_ary['leather_id']]['name']}</td>																	
						</tr>
<!--
EOT;
$showimg=$leather_arr[$product_info_ary['leather_id']]['photo'];
}
if($showimg!=''&&file_exists("./zh/attachments/".$showimg))
{
  $showimg='<img src="./zh/attachments/'.$showimg.'"    />';
}else{  
   $showimg='';
}
if ($product_info_ary['marbleshown'] != '') {
print <<<EOT
-->																	
						<tr>
							<td height="15" align="left" valign="top"><strong style="color:#333;">Marble</strong></td>
							<td  valign="top" align="center">:</td>
							<td >{$product_info_ary['marbleshown']}</td>																		
						</tr> 
																
<!--
EOT;
}
if ($isLogin) {
print <<<EOT
-->	

       <tr>
       <td colspan="3" height="1"></td>
       </tr> 
       <tr>
       <td colspan="3"></td>
       </tr>      
       <tr>
           <td height="18"><strong style="color:#333;">{$money_type}</strong></td>
           <td align="center">:</td>
           <td>{$price_show}</td>           
       </tr>
       
<!--
EOT;
}
print <<<EOT
-->
       
   </table>                
   </td> 
   <td align="right" valign="top" width="50%" style="padding:5px;">   
   <table cellpadding="0" cellspacing="0" width="100%">
   
<!-- 
EOT;
if ($isLogin) {
print <<<EOT
-->
   
   <tr>
   <td height="22" width="30" align="left">Qty</td>
   <td align="center" width="20">:</td>  
   <td valign="middle" align="left"><input type="text" id="buy_num_form" name="buy_num_form" style="width:85px;" /></td>  
   </tr>  
   <tr>
   <td height="22" align="left">Finish</td>
   <td align="center" width="20">:</td> 
   <td align="left"><select style="width: 85px;" name="selFinishes" id="selFinishes" onchange="FinishItemChange(this.options[this.selectedIndex].value);">
<!--
EOT;
foreach ($aryFinishItem as $k=>$v) {
print <<<EOT
-->
<option value='{$v["id"]}'>{$v["name"]}</option>
<!--
EOT;
}
print <<<EOT
-->	
</select></td>   
   </tr>      
   <tr>
   <td colspan="3" height="31"></td>
   </tr>
    <tr>
   <td colspan="3"  height="25">
    <div align="right" class="addtocart"><a href="javascript:;" onclick="addCart('{$product_info_ary['id']}')" >Add to Order</a></div>
   </td>
   </tr>
   <!--<tr>
   <td colspan="3" height="25">
   <div class="new_wishlist" onclick="addWishlist('{$product_info_ary['id']}', '{$product_info_ary['code']}',1)">Add to NEW Wishlist</div>
   </td>
   </tr>-->
   <tr>
   <td colspan="3"  height="25">
   <!--<div class="wishlist" onclick="addWishlist('{$product_info_ary['id']}', '{$product_info_ary['code']}',0)" style="position:relative;overflow:visible;">Add to Wishlist -->
  <div style="position:relative;overflow:visible; height:21px;"> 
   <div class="wishlist"  onclick='showTaggle("addwislistPop")'>Add to Wish List
   <!-- begin  --></div>
   
   <div class="addwislistPop" id="addwislistPop">
   <div class="closebtn" onclick='hiddeDIV("addwislistPop")'></div>
   
   <table cellpadding="0" cellspacing="0" border="0" width="330" >
       <tr>
         <td class="tob_bg1" width="28" height="25"></td>
         <td class="tob_bg3" width="143"></td>
         <td class="tob_bg2" width="34"></td>
         <td class="tob_bg3" width="140"></td>
         <td class="tob_bg4" width="22"></td>
       </tr>
   <tr>
   <td class="left_bg1" style="background-color:#fff;"></td>
   <td colspan="3" style="background-color:#fff;">
   
   
   <table cellpadding="0" cellspacing="0" border="0" width="300">
   <tr>
     <td>
        <h4 class="title">Add to Wish List </h4>
    </td>
   </tr>
   <tr>
    <td height="30">
    Select a wish list to add this item to 
    </td>
   </tr>
   <tr>
   <td height="30">
     <select class="selectcss" id="selWishlist" name="selWishlist">
       <option value="0">--Select--</option>
<!--
EOT;
foreach($wishlist_ary as $k=>$v) {
print <<<EOT
-->
       <option value="{$v['id']}">{$v['name']}</option>
<!--
EOT;
}
print <<<EOT
-->
     </select>
       <a href="javascript:addWishlist(0);"><img src="./css/images/save_btn.gif" alt="Save" border="0"/></a>
    </td>
   </tr>
   <tr>
      <td  height="30">If you want to add this item to a  new wish list,&nbsp;<a style="text-decoration:underline" href='javascript:showTaggle("addnew-wishlist")'>click here</a></td>
   </tr>
   <tr id="addnew-wishlist" class="addnew-wishlist">
     <td height="30">
     Add wish list <input type="text" class="inputlist" id="txtWishName" name="txtWishName"/>
     <a href="javascript:addWishlist(1);"><img src="./css/images/layer_box_bt3.gif" alt="Save" /></a> <a href='javascript:CancelClick();'><img src="./css/images/layer_box_bt4.gif" alt="cancel" border="0"/></a>
     </td>
   </tr>
   <tr>
   <td height="30">
   Edit wish list at <a href="wishlist_view.php" target="_blank">view wishlist </a> 
   </td>
   
   </tr>
   </table>
   
   </td>
   <td class="right_bg1"></td>
   </tr>
   <tr>
   <td class="foot_bg1" height="8"></td>
   <td colspan="3" class="foot_bg2"></td>
   <td class="foot_bg3"></td>
   </tr>
   </table>  
   </div> 
   </div>
     <!-- end -->
   
   </td>
   </tr>
   
<!-- 
EOT;
}
print <<<EOT
-->
  
   </table>
   </td>
     
	 </tr>	
   <tr>
    <td >
     <div style="overflow:hidden; margin:0 auto; height:192px;">
<!--
EOT;
if ($isLogin) {
print <<<EOT
-->
     <img id="imgFinishItem" src="{$strFirstFinishItem}" alt="" width="100%" height="196px" {$strDisplay}/>
<!--
EOT;
}
print <<<EOT
-->
     </div>
     </td>
	        
	                     <td  valign="top">	                     
	                       <div class="inf-img">	                      
	                    <!-- {$product_info_ary['info']}-->
<!--
EOT;
if ($isLogin) {
print <<<EOT
-->
						{$showimg}
<!--
EOT;
}
print <<<EOT
-->
	                     </div>
	                     </td>	 	                
	                 </tr>	                 
	 	<style type="text/css">
	 	
														td.shown_td div{
														margin:2px auto;
														padding-top:0px;
														margin-top:0px;
														}
														
														table.sp{
														width:100%;
														padding:0px;
														margin:0px;
													/* 	border-collapse:collapse; */
														}
														table.sp tr{
														padding-top:0px;
														margin-top:0px;
														}
														table.sp td{
														vertical-align:top;
														padding-top:0px;
														margin-top:0px;
														padding-bottom:2px;
														}
														td.sp1{
														text-align:left;width:40px;
														
														}
														td.sp2{
														text-align:right;width:40px; 
														}
														td.sp3{
														text-align:left; 
														}
														</style>
                       
                          
<!--
EOT;
if ($no_preview_next) {
print <<<EOT
-->     


<!--
EOT;
} else {
print <<<EOT
--> 
                          
                            
<!--
EOT;
}
print <<<EOT
--> 
                            
                      
                       
                          
                    
                          
                          <!--tr>                                 
                            <td colspan=2>&nbsp;</td>
                            <td colspan=4 align="center" valign="middle">
                              <a href="javascript:;" onClick="MM_openBrWindow('printer.php?page=product_details&pid={$product_info_ary['id']}','printerfriendly','scrollbars=yes,width=600,height=500')" onMouseOver="MM_swapImage('jf_button_printer_friendly','','./images/button/jf_button_print-over.gif',1)" onMouseOut="MM_swapImgRestore()">
                              <img src="./images/button/jf_button_print.gif" alt="Printer Friendly" name="jf_button_printer_friendly" width="90" height="20" border="0" id="jf_button_printer_friendly">
                              </a>
                            </td>
                            <td colspan=2 align="right" valign="middle">                              
                            </td>
                          </tr-->
                          
                          
                                                
                          <!--tr>
                            <td colspan="8" height="15" align="left" valign="middle"><strong>Dimensions:</strong> &nbsp;
                              Length: <span class="productDetailsGoldText"> {$product_info_ary['length']} </span> &nbsp;
                              Width: <span class="productDetailsGoldText"> {$product_info_ary['width']} </span> &nbsp;
                              Height: <span class="productDetailsGoldText"> {$product_info_ary['height']} </span> &nbsp;<br>
                              <strong>CBM:</strong> <span class="productDetailsGoldText"> {$product_info_ary['cbm']} </span> &nbsp;<br>
                              <!--Depth: <span class="productDetailsGoldText"> n/a </span>--> 
                           
                                                  
                        </table>
						
<!--info table end -->						 
<!--
EOT;
}
print <<<EOT
--> 
			
						</td>
                     </tr>
                     <tr>
                      
                     <td valign="top" style="vertical-align: top; padding-top: 9px;" colspan="3">
<!--
EOT;
if ($isLogin) {
if (count($arySettingProduct)>0) {
print <<<EOT
-->     
<div><strong style="color:#333">Related Items:</strong> </div><div class="releatedImage" id="divSettingProduct"></div>	 
<!--
EOT;
} 
}
print <<<EOT
-->        
 </td>
                   
                    </tr>
                    <tr>
                      <td ></td>
                      <td ><img name="" src="images/spacer.gif" width="5" height="5" alt=""></td>
                      <td></td>
                    </tr>                    
                  </table>
                  
                  <div><img name="" src="images/spacer.gif" width="568" height="4" alt=""></div>                  
                  <iframe name='addwishlistiframe' width=0 height=0 src="about:blank" id='addwishlistiframe' style="display:none"></iframe>
                  <iframe name='addtocontentiframe' width=0 height=0 src="about:blank" id='addtocontentiframe' style="display:none"></iframe>
        
        
       
          </div> 
                   
   	  </div>	
   <div class="clearBack">
                     <div align="right" class="backtolisting" style="display:block;"><a target="_self" href='{$return_href}'><img border="0" align="texttop" alt="Return to wishlist" src="css/images/return.jpg"> <strong>  Return to Listings </strong></a></div>
                
        </div>
   
<script type="text/javascript">
<!--

var height2 =screen.height;
var width2 =screen.width;
//alert(width2+"x"+height2);
if (height2 <769) {
//if (height2 <1025) {
    location.href="#small_screen";
}

-->
</script>


<!--
EOT;
?>-->